Field of the Invention
The present invention relates to a calculation device, favorably of an image pickup device such as a digital camera or a video camera, for example for calculation of a defocus amount.
Description of the Related Art
As one of autofocus (AF) methods equipped in image pickup devices such as cameras, there is a phase difference detection method (hereinafter, written as phase difference autofocus).
In the phase difference autofocus, a light flux having passed through an exit pupil of a photographic lens is divided into two, and the divided light fluxes are respectively received by a pair of focus detection sensors.
Then, by detecting a shift amount of signals output from the pair of focus detection sensors, that is, an amount of relative position shift amount (hereinafter, written as image shift amount) of the light fluxes in a dividing direction, a shift amount (hereinafter, written as defocus amount) of the photographic lens in a focusing direction is obtained, and a focus lens is controlled.
Japanese Patent Laid-Open No. 2001-305415 discloses a configuration that does not require dedicated focus detection sensors by providing a phase difference detection function to an image pickup element, and realizes high-speed phase difference autofocus.
The configuration of Japanese Patent Laid-Open No. 2001-305415 divides a photoelectric conversion unit of a pixel of the image pickup element into two and provides a pupil-dividing function to the divided photoelectric conversion units, and individually processes outputs of the divided photoelectric conversion units, thereby to perform focus detection, and uses an added-up output of the divided photoelectric conversion units as an image signal.
Japanese Patent Laid-Open No. 2010-271419 discloses a configuration that decreases an influence of noises in focus detection by a photoelectric conversion unit to which a pupil-dividing function is provided.
The configuration of Japanese Patent Laid-Open No. 2010-271419 detects brightness of each line of an image pickup element, and performs line addition in a case where the brightness is darker than brightness set in advance.
Further, Japanese Patent Laid-Open No. 2012-128287 discloses a method of setting a focus detection area for increasing accuracy of focus detection in a case where a face is small in performing the focus detection for the face detected from an image pickup signal.
However, the configuration of Japanese Patent Laid-Open No. 2001-305415 has a problem that, in setting a focus detection area to a face detected from an image pickup signal, the focus detection area having a sufficient size cannot be set when the face is small, and accuracy of the focus detection is decreased.
Further, there is a problem that near and far objects in one frame occur because the face and the background enter the focus detection area, if the focus detection area remains large in order to increase the accuracy.
The configuration of Japanese Patent Laid-Open No. 2010-271419 has a problem that an optimum focus detection area cannot be set to the face detected from the image pickup signal because the line addition is performed according to the brightness.
The configuration of Japanese Patent Laid-Open No. 2012-128287 provides the focus detection area to a body as well in the case where the face is small, thereby to suppress the decrease in the focus detection accuracy.
However, no consideration is given to an addition method in the focus detection area in the phase difference autofocus, and to a ratio of enlargement of the focus detection area.